<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>maxRow Test</title>

  <link rel="stylesheet" href="../../../demo/demo.css"/>

  <script src="../../../dist/jquery.min.js"></script>
  <script src="../../../dist/jquery-ui.min.js"></script>
  <script src="../../../src/gridstack.js"></script>
  <script src="../../../src/gridstack.jQueryUI.js"></script>
</head>
<body>
  <div class="container-fluid">
    <h1>maxRow Test</h1>
    <br/>
    <div class="grid-stack"></div>
  </div>

  <script type="text/javascript">
    var grid = GridStack.init({float: true, maxRow: 3});

    var items = [
      {x: 0, y: 1, width: 1, height: 2},
      {x: 1, y: 3, width: 2, height: 1, text: 'Y=3 out of bound should align'}
    ];
    var count = 0;

    grid.batchUpdate();
    items.forEach(function (node) {
      node.id = count++;
      grid.addWidget('<div><div class="grid-stack-item-content">' + (node.text? node.text : node.id) +'</div></div>', node);
    });
    grid.commit();
  </script>
</body>
</html>
